]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensionSystem: Catch and log session update errors
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Thu, 3 Oct 2024 15:00:20 +0000 (17:00 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 17 Oct 2024 16:51:31 +0000 (18:51 +0200)
If sessionUpdated() fails we get a js failure but not information about
where the actual problem was, so catch for error properly.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3495>
(cherry picked from commit 368a685717bb5ae0f7b07e5ff9a80edf7b3a9fa7)

js/ui/extensionSystem.js

index bc804377e83d21f7f609f6ce9e7b2b363a41f182..9b5b944b6b477f79afd975e2cb9b3b802648bfb6 100644 (file)
@@ -43,7 +43,7 @@ export class ExtensionManager extends Signals.EventEmitter {
             () => this._reloadExtensionStylesheets());
 
         Main.sessionMode.connect('updated', () => {
-            this._sessionUpdated();
+            this._sessionUpdated().catch(logError);
         });
     }
 
@@ -73,7 +73,7 @@ export class ExtensionManager extends Signals.EventEmitter {
         this._installExtensionUpdates();
         this._sessionUpdated().then(() => {
             ExtensionDownloader.checkForUpdates();
-        });
+        }).catch(logError);
 
         GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, UPDATE_CHECK_TIMEOUT, () => {
             ExtensionDownloader.checkForUpdates();